package org.agile4j.patterns.proxy.hr;

import java.util.List;

public class Client {
	public static void main(String[] args) throws Exception {
		UserManager um = new UserManager();
		List<UserModelApi> userList = um.getUserByDeptId("0101");
		
		// 如果只显示用户名,这不需要重新查询数据库
		for (UserModelApi a : userList) {
			System.out.println(a.getUserId() + "," + a.getName());
		}
		
		// 如果只显示用户名,这不需要重新查询数据库
		for (UserModelApi a : userList) {
			System.out.println(a.getUserId() + "," + a.getName() + "," + a.getDeptId() + "," + a.getSex());
		}
		
		// 如果只显示用户名,这不需要重新查询数据库
		for (UserModelApi a : userList) {
			System.out.println(a.getUserId() + "," + a.getName());
		}
	}
}
